<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JsUnit OnLoad Tests</title>
    <link rel="stylesheet" type="text/css" href="../css/jsUnitStyle.css">
    <script language="JavaScript" type="text/javascript" src="../app/jsUnitCore.js"></script>
    <script language="JavaScript" type="text/javascript" src="../../lib/MJ.js"></script>
    <script language="JavaScript" type="text/javascript">
        function testIsSankantsu1() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["1p", "1p", "4m", "5m", "6m",
	                  "2s", "2s", "2s", "2s",
			  "8m", "8m", "8m", "8m",
			  "發", "發", "發", "發"], "6m");
	    assertTrue(MJ.isSankantsu(tehai.get()));
        }

        function testIsSankantsu2() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["中", "中", "中", "北", "北",
	                  "2m", "2m", "2m", "2m",
			  "9s", "9s", "9s", "9s",
			  "東", "東", "東", "東"], "北");
	    assertTrue(MJ.isSankantsu(tehai.get()));
        }

        function testIsSankantsu3() {
            var tehai = new MJ.Tehai();
	    tehai.addAll(["中", "中", "中", "北", "北",
	                  "2m", "2m", "2m",
			  "9s", "9s", "9s", "9s",
			  "東", "東", "東", "東"], "北");
	    assertFalse(MJ.isSankantsu(tehai.get()));
        }
    </script>
</head>

<body>
<h1>MJ isTitoitsu Tests</h1>

<p>This page contains tests for the JsUnit Framework. To see them, take a look at the source.</p>
</body>
</html>
